home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d6 / glazer.arc / INVVALUE.BAS < prev    next >
BASIC Source File  |  1988-10-07  |  895b  |  23 lines

  1. 100 'Investment Value ("INVVALUE")
  2. 110 CLS
  3. 120 COLOR 0,15 : PRINT "Investment Value" : COLOR 15,0
  4. 130 DEFDBL A-Z
  5. 140 MONEYFMT$ = "$$##,###,###.##"
  6. 150 PRINT : PRINT
  7. 160 PRINT "Do not enter dollar signs or commas"
  8. 170 PRINT
  9. 180 '     Let user enter data
  10. 190 INPUT "Value of investment at end of term: ", FV
  11. 200 INPUT "Income each period: ", PMT
  12. 210 INPUT "Total number of periods: ", NPERIODS
  13. 220 INPUT "Number of income receipts per year: ", NPY
  14. 230 INPUT "Annual interest rate (in percent): ", AR
  15. 240 '     Find present value of income receipts
  16. 250 PR = (1 + AR / 100) ^ (1 / NPY) - 1
  17. 260 IF PR <> 0  THEN VALUEINCOME = (PMT / PR) * (1 - (1 + PR) ^ -NPERIODS)                      ELSE VALUEINCOME = PMT * NPERIODS
  18. 270 '     Add value at end of term
  19. 280 PV = VALUEINCOME + FV * (1 + PR) ^ -NPERIODS
  20. 290 PRINT
  21. 300 PRINT "Value of investment: ";USING MONEYFMT$; PV
  22. 310 END
  23.